package com.eastfair.imaster.api;

import com.eastfair.core.base.R;
import com.eastfair.imaster.dto.ExhibitorDTO;
import com.eastfair.imaster.entity.ExhibitorProduct;
import com.eastfair.imaster.hystrix.ExhibitorApiFallback;
import com.eastfair.imaster.vo.ExhibitorVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.ArrayList;
import java.util.List;

/**
 * auth feign接口
 *
 * @Author ligang
 * @Date 2021/7/16 16:41
 */
@FeignClient(value = "imaster/exhibitor",fallback = ExhibitorApiFallback.class)
public interface ExhibitorServiceFeign {
    /**
     * 添加公司到展商
     *
     * @param exhibitorDTO
     * @return
     */
    @PostMapping("/exhibitor/addCompanyOfExhibitor")
    R addCompanyOfExhibitor(@RequestBody ExhibitorDTO exhibitorDTO);

    /**
     * 批量新增/修改展品
     * @param exhibitorProducts 展品list
     * @return 执行成功true/失败false
     */
    @PostMapping("/exhibitor/exhibitorProduct/upsert")
    R<Boolean> upsertExhibitorProduct(@RequestBody List<ExhibitorProduct> exhibitorProducts);


    /**
     * 批量查询展商信息
     *
     * @param exhibitorDTO ids 展商id集合
     * @return
     */
    @ApiOperation(value = "批量查询展商信息", notes = "批量查询展商信息")
    @PostMapping("/queryByIdsOfAll")
    R<List<ExhibitorVo>> queryByIds(@RequestBody ExhibitorDTO exhibitorDTO);


}
